package java_demo;

public class zuoye1102{
	public static void main(String[] args) {
		int[] a=new int[] {10,20,30,40,50};
		for(int i=0;i<a.length;i++) {
			System.out.println(a[i]);
		}
		int[] b=new int[] {18,25,7,36,13,2,89,63};
		int max=b[0];
		int c=0;
		for(int i=0;i<b.length;i++) {
			if(max<b[i]) {
				max=b[i];
				c=i;
			}		
		}
		System.out.println(c+","+b[c]);	
		
		
		
		int[] d=new int[] {10,20,20,3,3,6};
		for(int i=0;i<d.length;i++) {
			for(int j=0;j<d.length;j++) {
				if(d[i]==d[j]&&i!=j) {
					d[j]=0;
				}	
			}
	}
		for(int g=0;g<d.length;g++) {
			System.out.println(d[g]);
		}
		int[] a1=new int[] {-10,2,3,246,-100,0,5};
		int max1=a1[0];
		int min=a1[0];
		int avg=0;
		for(int i=0;i<a1.length;i++) {
			if(max1<a1[i]) {
				max1=a1[i];
			}
			
		}
		System.out.println(max1);
		for(int i=0;i<a1.length;i++) {
			if(min>a1[i]) {
				min=a1[i];
			}
		}
		System.out.println(min);
		double w=0.0d;
		for(int i=0;i<a1.length;i++) {
			avg=avg+a1[i];
//		w=avg/i;	
		}
		w=avg/a1.length;
		System.out.println(w);
		
		int[] aa=new int[5];
		int[] aaa=new int[] {1,21,32,132,1};
		String[] aaaa=new String[] {"fds","dsf"};
		String[] aaaaaa= {"fds","fdsfds"};
	}
		
}
